<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>全局组件</title>

</head>
<body>



<div id="app">

    <heima60 name="刘恶化" age="50"></heima60>
</div>



<script src="../node_modules/vue/dist/vue.js"></script>
<script>

    //局部组件在注册为组件之前，并不知道自己是组件

    let heima60 = {
        template: `<div>
            我的地址为:{{address}},名字为:{{name}},年龄为:{{age}}
        </div>`,
        data(){
          return{
              address:"中国上海"
          }
        },
        props:["name","age"]

    };

    let app = new Vue({
            el: "#app",
            components: {
                heima60
            }
        });
</script>
</body>
</html>